<?php echo $this->fetch('member.header.html'); ?>
<div class="content">
    <?php echo $this->fetch('member.menu.html'); ?>
    <div id="right">
        <?php echo $this->fetch('member.curlocal.html'); ?>
        <div class="profile clearfix">
            <div class="info_lcol">
                <div class="photo">
                    <img src="<?php echo $this->_var['user']['portrait']; ?>" width="100" height="100"/>
                    <a href="<?php echo url('app=member&act=profile'); ?>"><div class="mask"></div></a>
                </div>
                <div class="info_m">
                    
                    <!--<div class="u_name"><a href="<?php echo url('app=member&act=profile'); ?>"><?php echo htmlspecialchars($this->_var['user']['user_name']); ?></a></div>-->
                    <div class="u_name"><a href="<?php echo url('app=member&act=profile'); ?>"><?php echo htmlspecialchars($this->_var['user']['phone_mob']); ?></a></div>
                    
                    <div class="u_level">
                        <?php if ($this->_var['user']['ugrade']['grade_icon']): ?><img height="17" width="17" src="<?php echo $this->_var['user']['ugrade']['grade_icon']; ?>" /><?php endif; ?><?php echo $this->_var['user']['ugrade']['grade_name']; ?>
                        <br/><br/>
                        <?php if ($this->_var['user']['ugrade']['higher_grade_name']): ?>还需要<font color="red"><?php echo $this->_var['user']['ugrade']['distant_growth']; ?></font>个成长积分升级到<font color="red"><?php echo $this->_var['user']['ugrade']['higher_grade_name']; ?></font><?php endif; ?>
                    </div>
                </div>
            </div>
            <div class="info_rcol">
                <ul>
                    <li><label>当前积分:</label><a href="<?php echo url('app=my_integral_log'); ?>"><?php echo $this->_var['user']['integral']; ?></a></li>
                    <li><label>总积分:</label><a href="<?php echo url('app=my_integral_log'); ?>"><?php echo $this->_var['user']['total_integral']; ?></a></li>
                    <li><label>账户总金额:</label><a href="<?php echo url('app=account_log&act=logall'); ?>"><?php echo price_format($this->_var['user']['money']); ?></a></li>
                    <li><label>冻结金额:</label><a href="<?php echo url('app=account_log&act=logall'); ?>"><?php echo price_format($this->_var['user']['money_dj']); ?></a></li>
                </ul>
                <ul>
                    <?php if ($this->_var['store'] && $this->_var['member_role'] == 'seller_admin'): ?>
                    <li><label>卖家信用：</label><a href="<?php echo url('app=store&act=credit&id=' . $this->_var['store']['store_id']. ''); ?>" target="_blank"><?php echo $this->_var['store']['credit_value']; ?></a><?php if ($this->_var['store']['credit_value'] >= 0): ?> <img src="<?php echo $this->_var['store']['credit_image']; ?>" align="absmiddle" /> <?php endif; ?></li>
                    <li><label>卖家好评率：</label><span><?php echo $this->_var['store']['praise_rate']; ?>%</span></li>
                    <?php endif; ?>
                    <li><label>上次登录时间：</label><?php echo local_date("Y-m-d H:i:s",$this->_var['user']['last_login']); ?></li>
                    <li><label>上次登录 IP：</label><?php echo $this->_var['user']['last_ip']; ?></li>
                    <li><?php echo sprintf('您有 <em class="red">%s</em> 条短消息，<a href="index.php?app=message&act=newpm">点击查看</a>', $this->_var['new_message']); ?></li>
                </ul>
            </div>
        </div>
        <div class="platform clearfix">
            <div class="col-1">
                <div class="buyer-notice box-notice box">
                    <div class="hd clearfix"><h2>买家提醒</h2></div>
                    <div class="bd dealt">
                        <div class="list">
                            <h4>您需要立即处理：</h4>
                            <dl class="clearfix">
                                <dt>订单提醒：</dt>
                                <dd>
                                    <span><?php echo sprintf('<a href="index.php?app=buyer_order&type=pending">待付款订单(<em>%s</em>)</a>', $this->_var['buyer_stat']['pending']); ?></span>
                                    <span><?php echo sprintf('<a href="index.php?app=buyer_order&type=shipped">待确认的订单(<em>%s</em>)</a>', $this->_var['buyer_stat']['shipped']); ?></span>
                                    <span><?php echo sprintf('<a href="index.php?app=buyer_order&type=finished">待评价的订单(<em>%s</em>)</a>', $this->_var['buyer_stat']['finished']); ?></span>
                                </dd>
                            </dl>
                            
                        </div>
                        <div class="extra"></div>
                    </div>
                </div>
                <?php if ($this->_var['store'] && $this->_var['member_role'] == 'seller_admin'): ?>
                <div class="seller-notice box-notice box">
                    <div class="hd clearfix">
                        <h2>卖家提醒</h2>
                        <p></p>
                    </div>
                    <div class="bd">
                        <div class="list">
                            <dl class="clearfix">
                                <dt>订单提醒：</dt>
                                <dd>
                                    <span><?php echo sprintf('<a href="index.php?app=seller_order&type=submitted">待处理的订单(<em>%s</em>)</a>', $this->_var['seller_stat']['submitted']); ?></span>
                                    <span><?php echo sprintf('<a href="index.php?app=seller_order&type=accepted">待发货的订单(<em>%s</em>)</a>', $this->_var['seller_stat']['accepted']); ?></span>
                                </dd>
                            </dl>
                            
                        </div>
                        <div class="extra">
                            <span>店铺等级：<?php echo $this->_var['sgrade']['grade_name']; ?></span>
                            <span>有效期：<?php if ($this->_var['sgrade']['add_time']): ?><?php echo sprintf('剩余 %s 天', $this->_var['sgrade']['add_time']); ?><?php else: ?>不限制<?php endif; ?></span>
                            <span>商品发布：<?php echo $this->_var['sgrade']['goods']['used']; ?>/<?php if ($this->_var['sgrade']['goods']['total']): ?><?php echo $this->_var['sgrade']['goods']['total']; ?><?php else: ?>不限制<?php endif; ?></span>
                            <span>空间使用：<?php echo $this->_var['sgrade']['space']['used']; ?>M/<?php if ($this->_var['sgrade']['space']['total']): ?><?php echo $this->_var['sgrade']['space']['total']; ?>M<?php else: ?>不限制<?php endif; ?></span>
                        </div>
                    </div>
                </div>
                <?php endif; ?>
                <?php if ($this->_var['_member_menu']['overview']): ?>
                <div class="apply-notice box-notice box">
                    <div class="hd clearfix"><h2>开店提醒</h2></div>
                    <div class="bd">
                        <div class="extra">
                            <?php if ($this->_var['applying']): ?>
                            <?php echo sprintf('您的店铺正在审核中。你可以：<a href="index.php?app=apply&step=2&id=%s">查看或修改店铺信息</a>', $this->_var['user']['sgrade']); ?>
                            <?php else: ?>
                            您目前不是卖家，您可以：<a href="<?php echo $this->_var['_member_menu']['overview']['url']; ?>" title="<?php echo $this->_var['_member_menu']['overview']['text']; ?>"><?php echo $this->_var['_member_menu']['overview']['text']; ?></a>
                            <?php endif; ?>
                        </div> 
                    </div>
                </div>
                <?php endif; ?>
            </div>
            <div class="col-2">
                <div class="mall-notice box">
                    <div class="hd clearfix"><h2>商城公告</h2></div>
                    <ul class="bd">
                        <?php $_from = $this->_var['system_notice']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'article');if (count($_from)):
    foreach ($_from AS $this->_var['article']):
?>
                        <li><a href="<?php echo url('app=article&act=view&article_id=' . $this->_var['article']['article_id']. ''); ?>" target="_blank"><?php echo sub_str(htmlspecialchars($this->_var['article']['title']),30); ?></a></li>
                        <?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();; ?>
                    </ul>
                </div>
                <div class="mall-customer box">
                    <div class="hd"><h2>平台客服联系方式</h2></div>
                    <ul class="bd">
                        <li>联系电话：<?php echo $this->_var['site_phone_tel']; ?></li>
                        <li>电子邮箱：<?php echo $this->_var['site_email']; ?></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>
